#include<stdio.h>
#include<stdlib.h>

int main(){
	FILE*fp;
	if((fp = fopen("f2.txt","w"))==NULL){
		printf("该文件不存在！");
		exit(0);
	}
	char str[20];
	gets(str);
	fprintf(fp,"%s",str);
	
	if((fp = fopen("f2.txt","r"))==NULL){
		printf("该文件不存在！");
		exit(0);
	}
	while(!feof(fp)){
		fscanf(fp,"%s",str);
	}
	printf("%s",str);
}
